<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
</head>
<body>
<script src="../../../node_modules/navigo/lib/navigo.js"></script>
<script type="module">
  import { makeRouter } from '../basicRouter.js'

  const router = makeRouter(['', 'info'])

  const notAMap = Object.create(new Map())
  const nullConstructor = { constructor: null }
  const constructorThatThrows = {
    get constructor() {
      throw new Error('haha!')
    }
  }
  const toStringThatThrows = {
    get [Symbol.toStringTag]() {
      throw new Error('yolo!')
    }
  }

  router.addAfterHook('/info', () => {
    console.log(notAMap)
    console.log(nullConstructor)
    console.log(constructorThatThrows)
    console.log(toStringThatThrows)
  })
</script>
</body>
</html>